<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">  
<head >    
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <title>Revendications</title>
    <link rel="stylesheet" href="${resource(dir:'css',file:'style.css')}" type="text/css" media="screen">
	
    <!--[if lte IE 6]>
<link href="http://www.free-wordpress-theme.net/demo/wp-content/themes/persimmon/ie6.css" rel="stylesheet" type="text/css" />
<![endif]-->

    <!--[if lte IE 7]>
<link href="http://www.free-wordpress-theme.net/demo/wp-content/themes/persimmon/ie7.css" rel="stylesheet" type="text/css" />
<![endif]-->

	<script src="${resource(dir:'js',file:'mootools.v1.11.js')}" type="text/javascript"></script>

    <meta name="robots" content="noindex,nofollow">
	<script type="text/javascript" src="${resource(dir:'js',file:'jquery.js')}"></script>

    <link rel="stylesheet" href="${resource(dir:'css',file:'default.css')}" type="text/css">
    <g:layoutHead />
    <g:javascript library="prototype"/>
	
  </head>

   <body>

    <div id="page">

      <div id="header">

        <div id="description">



        </div> 


      </div>


      <div id="menu">

        <ul id="dropmenu">

          <li>
            <g:link controller="user" action="home" title="Home Page">
		       Home
		    </g:link>
          </li>
           <g:if test="${session.user}">
           <li>
            <g:link controller="post" action="create" title="Ecrire une revendication">
		       Revendiquer
		    </g:link>
          </li>
          </g:if>



        </ul> 
        <g:if test="${session.user}">
        	
        	<div id="welcome">
        		Welcome ${session.user.login }
        	</div>
        	<div id="logout">
		    <g:link controller="user" action="logout">
        		<img src="${resource(dir:'images',file:'quit.png')}"></input>
        	</g:link>
        	</div>
        </g:if>
        <g:else>
        <div id="loginMenu">
	        <g:form controller="user">       
	        	Login
	          	<input type="text" id="login" name="login" value='${user?.login}'></input>
	          	Password
	          	<input type="text" id="password" name="password" value='${user?.password}'></input>
	          	<g:actionSubmit action="doLogin" value="Login" />
	          	<g:actionSubmit action="register" value="Register" />
			 </g:form>
			 </div>
        </g:else>
        
        
		    
      </div>
	
		<g:layoutBody />
		
		<div id="sidebar">

          <div class="addthis_toolbox">

           
			<script type="text/javascript" src="./Test Drive Blog_files/addthis_widget.js"></script>
            <div class="atclear">            </div>          </div>

          <ul>
			<li>
              <h2>Navigation</h2>

              <ul>
               
						<li>
							<g:link controller="user" action="showAll" id="allRevendic" title="Voir toutes les revendications">
		       						Toutes les revendications
		       				</g:link>
						</li>
      			
              </ul>
              </li>
              <li>
              
               <h2>Etudiants              </h2>

              <ul>
                <g:each in="${users}" var="user">
						<li>
							<g:link controller="user" action="showPosts" id="${user.id}" title="Voir les revendications de ${user.login}">
		       						${user.login} (${user.posts.size()})
		       				</g:link>
						</li>
      			 </g:each>
              </ul>

            </li>
			
          </ul>

        </div>

      </div>
      <div style="clear:both;">      </div>
     
       
     </body>
    </html>